<template>
  <view class="list-container">
    <uni-list>
      <uni-list-item v-for="(item, index) in listData" 
        :key="index"
        :title="item.title"
        :thumb="item.icon"
        thumbSize="medium"
        showArrow
        @click="handleClick(item)"
      />
    </uni-list>
  </view>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

// 列表数据
const listData = ref([
  {
    title: 'vivo手机用户',
    icon: '/static/order/vivo.png',
  },
  {
    title: '华为手机用户',
    icon: '/static/order/huawei.png',
  },
  {
    title: '小米手机用户',
    icon: '/static/order/xiaomi.png',
  },
  {
    title: 'OPPO手机用户',
    icon: '/static/order/oppo.png',
  }
])

// 点击事件处理
const handleClick = (item: any) => {
  console.log('点击了项目:', item)
}
</script>

<style lang="scss">
.list-container {
  .uni-list-item__icon-img {
    width: 30px !important;
    height: 30px!important;
  }
}
</style>